home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6025 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  684 b 

  1. Path: vixen.cso.uiuc.edu!usenet
  2. From: WEIMIN YANG <w-yang3>
  3. Newsgroups: comp.lang.c++
  4. Subject: Run time dynamic 2-D array?
  5. Date: 11 Feb 1996 18:33:45 GMT
  6. Organization: University of Illinois at Urbana
  7. Message-ID: <4flcq9$i1k@vixen.cso.uiuc.edu>
  8. NNTP-Posting-Host: sparc19.cs.uiuc.edu
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.12 (X11; I; SunOS 5.4 sun4c)
  13. X-URL: news:comp.lang.c++
  14.  
  15. I need to use a 2-D array. I use following code.
  16.  
  17. void tryit(int a, int b) {
  18.  
  19. float c= new float[b][a];
  20.  
  21. ...
  22.  
  23. ....
  24.  
  25. }
  26.  
  27. I get compile error. Is there another way to do it? By the way, I don't want to
  28. use 1-D array to implement it.
  29.  
  30.